<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head></h:head>
    <h:form prependId="false">

    <p:dataTable var="gvs" value="#{giaovienBO.listAllGiaoVien()}" id="list" rows="6" rowEditListener="#{giaovienBO.edit}" selectionMode="single" >
   
        <f:facet name="header"  >
            <p:commandButton action="" image="/resources/images/dock/teacher.png" />
            Giáo Viên 
        </f:facet>

        <p:column headerText=" Mã Giáo Viên" style="width:150px">
           
                 <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{gvs.magv}" />
                </f:facet>
                <f:facet name="input">
                    <h:inputText value="#{gvs.magv}" style="width:100%"/>
                </f:facet>
            </p:cellEditor>
                   

               
            
        </p:column>

        <p:column headerText="Ten Giao Vien" style="width:150px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{gvs.tengv}" />
                </f:facet>
                <f:facet name="input">
                    <p:inputText value="#{gvs.tengv}" style="width:100%"/>
                </f:facet>
            </p:cellEditor>
        </p:column>
        <p:column headerText="Ngay Sinh" style="width:150px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{gvs.ngaysinh}" />
                </f:facet>
                <f:facet name="input">
                    <p:calendar value="#{gvs.ngaysinh}" showButtonPanel="true" pattern="yyyy-MM-dd" style="width:100%"/>  
                </f:facet>
            </p:cellEditor>
        </p:column>
        <p:column headerText="Dia Chi" style="width:150px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{gvs.diachi}" />
                </f:facet>
                <f:facet name="input">
                    <p:inputText value="#{gvs.diachi}" style="width:100%" label="Dia Chi"/>
                </f:facet>
            </p:cellEditor>
        </p:column>
     <p:column headerText="Email" style="width:150px">
            <p:cellEditor>
                <f:facet name="output">
                    <h:outputText value="#{gvs.email}" />
                </f:facet>
                <f:facet name="input">
                    <p:inputText value="#{gvs.email}" style="width:100%" />
                </f:facet>
            </p:cellEditor>
        </p:column>
        <p:column headerText="Options">
            <p:rowEditor    />
        </p:column>

    </p:dataTable>

</h:form>


